<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of FlashComponent
 *
 * @author jhonny
 */
class FlashComponentTag {
    private $bgcolor;
    private $align;
    private $width;
    private $height;
    private $source;
    private $menu;
    private $quality;
    private $wmode;
    private $allowScriptAccess;
    private $scale;
    private $style;
    private $parameters;
    public function __construct() {
    }
    public function getStyle() {
        return $this->style;
    }

    public function setStyle($style) {
        $this->style = $style;
    }


    public function getAllowScriptAccess() {
        return $this->allowScriptAccess;
    }

    public function setAllowScriptAccess($allowScriptAccess) {
        $this->allowScriptAccess = $allowScriptAccess;
    }

    public function getScale() {
        return $this->scale;
    }

    public function setScale($scale) {
        $this->scale = $scale;
    }    
    public function getBgcolor() {
        return $this->bgcolor;
    }

    public function setBgcolor($bgcolor) {
        $this->bgcolor = $bgcolor;
    }

    public function getAlign() {
        return $this->align;
    }

    public function setAlign($align) {
        $this->align = $align;
    }

    public function getWidth() {
        return $this->width;
    }

    public function setWidth($width) {
        $this->width = $width;
    }

    public function getHeight() {
        return $this->height;
    }

    public function setHeight($height) {
        $this->height = $height;
    }

    public function getSource() {
        return $this->source;
    }

    public function setSource($source) {
        $this->source = $source;
    }

    public function getMenu() {
        return $this->menu;
    }

    public function setMenu($menu) {
        $this->menu = $menu;
    }

    public function getQuality() {
        return $this->quality;
    }

    public function setQuality($quality) {
        $this->quality = $quality;
    }

    public function getWmode() {
        return $this->wmode;
    }

    public function setWmode($wmode) {
        $this->wmode = $wmode;
    }


    public function getParameters() {
        return $this->parameters;
    }

    public function setParameters($parameters) {
        $this->parameters = $parameters;
    }

    public function getParametersToString() {
        $value='';
        if($this->getParameters()!=null){
            $value.='?'.$this->getParameters();
        }
        return $value;
    }
    public function toString() {
        $value = '';
        $value .=
'   <div class="'.$this->getStyle().'">
        <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'.$this->getWidth().'" height="'.$this->getHeight().'" align="'.$this->getAlign().'">
            <param name="allowScriptAccess" value="'.$this->getAllowScriptAccess().'" />
            <param name="movie" value="'.$this->getSource().$this->getParametersToString().'" />
            <param name="menu" value="'.$this->getMenu().'" />
            <param name="quality" value="'.$this->getQuality().'" />
            <param name="scale" value="'.$this->getScale().'" />
            <param name="bgcolor" value="'.$this->getBgcolor().'" />
            <param name="wmode" value="'.$this->getWmode().'">
            <embed src="'.$this->getSource().$this->getParametersToString().'" width="'.$this->getWidth().'" height="'.$this->getHeight().'" align="'.$this->getAlign().'" menu="'.$this->getMenu().'" quality="'.$this->getQuality().'" scale="'.$this->getScale().'" bgcolor="'.$this->getBgcolor().'" wmode="'.$this->getWmode().'" allowScriptAccess="'.$this->getAllowScriptAccess().'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
        </object>
    </div>
';

        return $value;
    }
}
?>
